details widget name

Servlets and Filters

Chapter details

HTTP requests in the Atlas system are handled by different servlets. There are two main servlets – the com.tetracom.atlas.iviewer.web.http.HtmlViewerServlet servlet that handles the ordinary request for HTML pages for the rendered site, and the com.tetracom.atlas.site.web.simple.http.ZHtmlViewerServlet – used in i-Publisher's simple mode.

The request handled by the HtmlViewerServlet must have the following format:

/domain/website/webpage/language/mode?parameters

where

  • domain is either the domain id or the domain alias;

  • website is either the website id or the website alias;

  • webpage is either the page id or the page alias;

  • language is the language code. This parameter is optional. If not provided, the default website language is used.

  • mode is the request mode. This parameter is optional.

The mappings for the other servlets usually start with the domain alias (or id) in order to activate the com.tetracom.atlas.iviewer.web.http.DomainFilter that is responsible for putting the current domain alias in the com.tetracom.atlas.system.SystemInformation object (thus, in ThreadLocal).

For instance, the following URL

/atlas/img/217X30/c183e1df-fce3-4530-aec2-7629bc946720/13ccaaa0-a0c0-11e0-8264-0800200c9a66/atlasdocumentation.png

is a request for the image servlet (com.tetracom.atlas.file.web.ImageServlet) and the response would be an image.

Servlets within the i-Publisher's system are ordinary HttpServlet objects covered in a com.tetracom.atlas.webapp.api.IServlet object (this object provides the mapping and the init parameters as well ). Servlets are registered by the com.tetracom.atlas.webapp.api.IServletProvider. However, filters should be covered in a com.tetracom.atlas.webapp.api.IInitialFilter filter object and registered by the com.tetracom.atlas.webapp.api.IInitialFilterProvider service. Both servlet. The filtersshould be registered in the WebContainer by the com.tetracom.atlas.iviewer.web.context.WebInitializer service.